package com.java.service.impl;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.java.dao.*;
import com.java.model.*;
import com.java.service.BuyingService;
@Service("BuyingService")
public class BuyingServiceiml implements BuyingService {

	private BuyingMapper buyingMapper;

	public BuyingMapper getAddMapper() {
		return buyingMapper;
	}
	@Autowired
	public void setAddMapper(BuyingMapper buyingMapper) {
		this.buyingMapper = buyingMapper;
	}
	
	@Override    
	public int EditNum(Buying buying) {
		return buyingMapper.EditNum(buying);
	}
	
	@Override    
	public int GetSum(Buying buying) {
		return buyingMapper.GetSum(buying);
	}
	
	@Override
	public int Add(Buying buying) {
		return buyingMapper.Add(buying);
	}
	
	@Override
	public int Del(int id) {
		int result = buyingMapper.Del(id);
		System.out.println("no:"+result);
		return result;
	}

	@Override
	public List<Buying> Get(Buying n) {
		return buyingMapper.Get(n);
	}

	@Override
	public int GetCount(Buying n) {
		return buyingMapper.GetCount(n);
	}
}
